<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">
<h:head></h:head>
<h:body>
 <ui:composition template="/templates/Plantilla.xhtml">
  <ui:define name="content">
	<h:form id="form">
	<p:growl id="growl1" />
		<p:dataTable id="tblCondicionIva" value="#{condicionIvaList.allCondicionIva}"
					 paginator="true" rows="10" var="ci">  			
  			
  			<f:facet name="header">Listado de Condicion de Iva </f:facet>
			<p:column>
  				<f:facet name="header">
  					<h:commandButton action="#{condicionIvaList.nuevaCondicionIva}" 
  					image="#{resource['images:plus-16-ns.png']}" title = "Nueva Condicion de Iva">
  					</h:commandButton>
  				</f:facet>
   				
   				<h:commandButton type="submit" action="#{condicionIvaList.prepareEdit(ci)}" 
   				image="#{resource['images:pencil-16-ns.png']}" title="Editar Condicion de Iva">			    					
  				</h:commandButton>			
  				
  				<p:commandLink onclick="dlg2.show()" title="Eliminar Condicion de Iva" actionListener="#{condicionIvaList.bajaListener(ci)}" >
  					<p:graphicImage value="#{resource['images:cross-16-ns.png']}"/>
  				</p:commandLink>
  				
 <p:dialog id="modalDialog" header="Eliminacion de Registro" widgetVar="dlg2" modal="true" resizable="false">  
    	
    	<h:outputLabel value="Desea Eliminar una Condición de Iva" />
    
    	<br></br>
    	<br></br>  
      <p:commandButton id="confirm" value="Si" oncomplete="dlg2.hide()"  
                    actionListener="#{condicionIvaList.eliminarCondicionIva()}" update="tblCondicionIva" ajax="false"/>  
       <p:commandButton id="decline" value="No" onclick="dlg2.hide()" type="button" ajax="false" />
</p:dialog> 
  			</p:column>			
  			
  			<p:column>
  				<f:facet name="header">Codigo</f:facet>
  				#{ci.condicionIvaId}
  			</p:column>

  			<p:column>
  				<f:facet name="header">Nombre</f:facet>
  				#{ci.nombre}
  			</p:column>

		</p:dataTable>
	</h:form>
  </ui:define>
 </ui:composition>	
</h:body>
</html>